package com.fingard.dsp.bank.reqrespobj.currencyexchange;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.currencyexchange.detail.ReqExchangeRecDetail;
import com.fingard.xml.XmlTextReader;

//结汇购汇请求类初始化ReqExchangeRecDetail数据信息
public class ReqExchange extends RequestBase{

	public ReqExchangeRecDetail singleDetail = null;
	
	private XmlTextReader xmlReader;
	public ReqExchange(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception{
		reqHeader = p_header;
		xmlReader = p_xmlReader;
		
		if(xmlReader.read(PATH_Detail)){//"/ATSYH/TransReq/TransParam/DetailRecord"
			singleDetail = new ReqExchangeRecDetail(xmlReader.readedXElement, reqHeader.transType,reqHeader.bankCode);
		}
		else{
			throw new Exception("不存在节点："+PATH_Detail);
		}
	}
}
